$(function() {
  chrome.tabs.getSelected(null, function(tab) {

    $("#action1").click( function(e) {
		debugger
		chrome.tabs.insertCSS(tab.tabId, {file: "js/jquery/css/dlchromeext/jquery-ui-1.10.3.custom.css"},
			function() {
				chrome.tabs.executeScript(tab.tabId, {file: "js/jquery/jquery.js"},
				function() {
					chrome.tabs.executeScript(tab.tabId, {file: "js/jquery/jquery-ui-1.10.3.custom.js"},
					function() {
						chrome.tabs.executeScript(tab.tabId, {file: "src/inject/inject.js"});
					});
				});
			});
    });

    $("#action2").click( function(e) {
	  // chrome.tabs.executeScript(tab.tabId, {file: "src/inject/inject.js"});
      // chrome.extension.sendRequest({cmd:'stopGather'});
    });
  });


});
